package figurs;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.Shape;
import org.eclipse.draw2d.geometry.PointList;
import org.eclipse.draw2d.geometry.Rectangle;

/**
 * 
 * @author IStroev.
 */
public class VoidPoint extends Shape {
	static PointList points = new PointList();

	protected void fillShape(Graphics graphics) {
		graphics.fillPolygon(getPoints(getBounds()));
	}
	protected void outlineShape(Graphics graphics) {
		graphics.drawPolygon(getPoints(getBounds()));
	}
	private static PointList getPoints(Rectangle r) {
		points.removeAllPoints();
		points.addPoint(r.getTop());
		return points;
	}
}